<?php
//adminModel
class AdminModel extends Model {

	//验证用户名和密码
	public function checkUser($username,$password){
		$password = md5($password);
		$sql = "SELECT * FROM cz_admin 
				WHERE admin_name = '$username' AND password = '$password'";
		// echo $sql;
		// exit;
		return $this->db->getRow($sql);
	}


	//获取所有的管理员
	public function getAdmins(){
		$sql = "SELECT * FROM cz_admin";
		return $this->db->getAll($sql);
	}


}